<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>
<%@ taglib prefix="myfn" uri="/WEB-INF/jstlfun.tld" %>
<%@ taglib uri="/WEB-INF/c.tld"  prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="x-ua-compatible" content="ie=7" />
	<TITLE>我的部落：i友邻社区</TITLE>
	<link rel="stylesheet" type="text/css" href="${cpath}/css/main.css" />
	<link rel="stylesheet" type="text/css" href="${cpath}/css/leftmenu.css" />
	<link rel="stylesheet" type="text/css" href="${cpath}/css/layout.css">
	<link rel="stylesheet" type="text/css" href="${cpath}/css/group.css" />
	
</head>
<body>
<script> 
	//转页面
	var curUserID = '${userID}';
	if((curUserID == "")||(curUserID == null)){
//		parent.window.location.replace("${cpath}/index.jsp"); 
	}
	function change_width(img_name,wid,hei)
	{
		var CurImage=new Image();
		if(CurImage.src!=img_name.src)
		{
			CurImage.src=img_name.src;
		}
		var img_width = CurImage.width;
		var img_height = CurImage.height;
		img_name.width = img_width;
		img_name.height = img_height;

		if(img_height/hei > img_width/wid)
		{
			if( img_height > hei)
			{
				img_name.width = img_name.width/img_name.height*hei;
				img_name.height = hei;
			}
		}
		else
		{
			if( img_width > wid)
			{
				img_name.height = img_name.height/img_name.width*wid;
				img_name.width = wid;
			}
		}
		return true;
	}
</script>

 	<!-- 页首 {{{ -->
	<%@ include file="/menu.jsp"%>
   
	<div id="mainBody">
	<!-- 左边菜单栏 {{{ -->
	<%@ include file="/leftmenu.jsp"%>

		<DIV id=group>

		<!-- 右侧宽栏 {{{ -->
		<DIV class=group_mid>

			<div class='subtop' >
					<p><a href="#"><img src="${cpath}/images/png-0184.png" ></a></p>
				<dl >
					<dt class="tit"><a href="#">部落</a></dt>
				</dl>
				<div class='fun'>
					<li><a href="javascript:history.go(-1);">返回上一页</a></li>
				</div>
			</div>
			<div id="section-header" style="margin-left:0px;">
					<ul id="nav-secondary">${theForm.qryUserID}
						<li id="nav-on"><a href="#" ><span>我的部落</span></a></li>
						<li ><a href="${cpath}/group.do?action=list&qryUserID=${userID}" ><span>好友部落</span></a></li>
						<li ><a href="${cpath}/group.do?action=list" ><span>全部部落</span></a></li>
					</ul>
					<ul class="related-links">
						<li class="last"><a href="${cpath}/group/createpage1.jsp" title="创建部落" rel="nofollow">创建部落</a></li> 
					</ul>
			</div>
			<DIV class='content'><!-- 右侧宽栏 }}}-->
			<H2><EM>最新部落话题</EM><SPAN>&nbsp;</SPAN></H2>
			<ul class=top>
				<!--部落更新话题-->
				<c:forEach var="forum" items="${forumlist}" varStatus="status">   
				<li><a href="${cpath}/qunzu_${forum.groupID}"><strong><c:out value="${myfn:getGroupName(forum.groupID)}"></c:out></strong></a>&nbsp;&nbsp;新发表的话题</li>
				<li><I><a href="${cpath}/qunzu_${forum.groupID}/huati_${forum.GForumID}">${fn:substring(forum.title,0,30)}</a></I><span>${myfn:formatMDHM(forum.CTime)}</span></li>
				</c:forEach> 	
				<li><a href="${cpath}/qunzu_${forum.groupID}"><strong><c:out value="${myfn:getGroupName(forum.groupID)}"></c:out></strong></a>&nbsp;&nbsp;新发表的话题</li>
				<li><I><a href="${cpath}/qunzu_${forum.groupID}/huati_${forum.GForumID}">123333333</a></I><span>${myfn:formatMDHM(forum.CTime)}</span></li>
			</ul>
			<H2><EM>最新部落回复</EM><SPAN>&nbsp;</SPAN></H2>
			<ul class=top>
				<c:forEach var="follforum" items="${follforumlist}" varStatus="status">   
				<li><a href="${cpath}/qunzu_${follforum.groupID}"><strong><c:out value="${myfn:getGroupName(follforum.groupID)}"></c:out></strong></a></li>
				<li><I><a href="${cpath}/qunzu_${follforum.groupID}/huati_${follforum.GForumID}">${fn:substring(follforum.content,0,40)}</a></I><span>${myfn:formatMDHM(follforum.MTime)}</span></li>
				</c:forEach> 	
			</ul>
			<H2><EM>最新活动</EM><SPAN>&nbsp;</SPAN></H2>
			<ul class=top>
				<c:forEach var="quest" items="${questlist}" varStatus="status">   
				<li><a href="${cpath}/qunzu_${quest.groupID}"><strong><c:out value="${myfn:getGroupName(quest.groupID)}"></c:out></strong></a></li>
				<li><I><a href="${cpath}/qunzu_${quest.groupID}/wenda_${quest.quID}">${fn:substring(quest.quTitle,0,40)}</a></I><span>${myfn:formatMDHM(quest.mtime)}</span></li>
				</c:forEach> 	
			</ul>

			<H2><EM>最新图片</EM><SPAN>&nbsp;</SPAN></H2>
			<!--部落更新图片-->
			<c:forEach var="pic" items="${piclist}" varStatus="status">   
			<div class='smallpic' >
				<p><a href="${cpath}/gpicture.do/get/GPicID_${pic.GPicID}.html"><img src="${cpath}${pic.folder}${pic.name}"  onload="change_width(this,132,100)"></a></p>
				<dl >
					<dd class="info">上传：<span>${myfn:getUserNick(pic.userID)}</span></dd>
				</dl>
			</div>
			</c:forEach> 	
			<div class='smallpic' >
				<p><a href="${cpath}/gpicture.do/get/GPicID_${pic.GPicID}.html"><img src="${cpath}/images/fm.jpg"  onload="change_width(this,132,100)"></a></p>
				<dl >
					<dd class="info">上传：<span>123132</span></dd>
				</dl>
			</div>
			<div class='smallpic' >
				<p><a href="${cpath}/gpicture.do/get/GPicID_${pic.GPicID}.html"><img src="${cpath}/images/fm.jpg"  onload="change_width(this,132,100)"></a></p>
				<dl >
					<dd class="info">上传：<span>123132</span></dd>
				</dl>
			</div>
			<div class='smallpic' >
				<p><a href="${cpath}/gpicture.do/get/GPicID_${pic.GPicID}.html"><img src="${cpath}/images/fm.jpg"  onload="change_width(this,132,100)"></a></p>
				<dl >
					<dd class="info">上传：<span>123132</span></dd>
				</dl>
			</div>
			<div class='smallpic' >
				<p><a href="${cpath}/gpicture.do/get/GPicID_${pic.GPicID}.html"><img src="${cpath}/images/fm.jpg"  onload="change_width(this,132,100)"></a></p>
				<dl >
					<dd class="info">上传：<span>123132</span></dd>
				</dl>
			</div>
			
			</div>			
			<div class='riber'>
				<H2><EM>我管理的部落</EM><SPAN><a href="${cpath}/group_mygroup/qryAddType_1.html">所有</a></SPAN></H2>
				<ul>
				<c:forEach var="group" items="${grouplist}" varStatus="status">   
				<c:if test="${group.type == '1' || group.type == '2'}"> 
				<li><a href="${cpath}/qunzu_${group.groupID}"><c:out value="${myfn:getGroupName(group.groupID)}"></c:out></a></li>
				</c:if>
				</c:forEach> 			
				</ul>

				<H2><EM>我加入的部落</EM><SPAN><a href="${cpath}/group_mygroup/qryAddType_3.html">所有</a></SPAN></H2>
				<ul>
				<c:forEach var="group" items="${grouplist}" varStatus="status">   
				<c:if test="${group.type == '3'}"> 
				<li><a href="${cpath}/qunzu_${group.groupID}"><c:out value="${myfn:getGroupName(group.groupID)}"></c:out></a></li>
				<li><a >${myfn:formatMDHM(group.CTime)}</a></li>
				</c:if>
				</c:forEach> 				
				</ul>
			</div>			

		</DIV><!-- profile_mid }}} -->
		</DIV><!-- group end }}} -->
	<DIV class="clear"></DIV>
	<%@ include file="/indexfoot.jsp"%>
	</DIV><!--cont end-->

</body>
</html>
<!---->

<script>

    /**
     * 检查项目资料维护
     */
	function doConfirm()
	{
		var form = document.theForm;

		var action = form['action'];

    form.submit();
	}

	/**
   * 根据具体请求设置各个组件状态	
   */
  function showState()
	{
		var action = '${theForm.action}';
		var form = document.theForm;		
		if(action == 'detail')
		{
           
			document.getElementById("back").style.display = "none";

		}
		else if(action == 'modifyPage' || action == 'update')
		{

			form['action'].value = 'update';
		}

	}
	showState();


</script>

